import 'package:flutter/cupertino.dart';

class SwapCustomerClip extends CustomClipper<Path> {
  double height;
  double width;
  SwapCustomerClip(this.width, this.height);
  @override
  Path getClip(Size size) {
    Path path = Path();
    path.moveTo(0.0, 0.0);
    path.lineTo(width, 0.0);
    // path 斜线效果
    path.lineTo(width, height);
    path.lineTo(0.0, height);
    path.close();
    return path;
  }

  @override
  bool shouldReclip(covariant CustomClipper<Path> oldClipper) {
    return true;
  }
}
